<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>滑动</title>
    <script src="./res/jquery-3.5.1.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
</head>

<body>
    <button id="inOrOut">向上 | 向下</button>
    <button id="hideBtn">向上</button>
    <button id="showBtn">向下</button>
    <br><br><br><br>
    <img src="./img/head.png" width="300px" alt="">
</body>

</html>
<script>
    // $(window.document).ready(function(e) {
    $(function(e) {
        $('#hideBtn').click(function(e) {
            // slow fast
            $('img').slideUp(1000 * 5);
        });
        $('#showBtn').click(function(e) {
            // slow fast
            $('img').slideDown(1000 * 5);
        });
        $('#inOrOut').click(function(e) {
            // slow fast
            $('img').slideToggle(1000 * 5);
        });
    });
</script>